IconTheme: Move changed emission to an idle
authorAlexander Larsson <alexl@redhat.com>
Wed, 19 Jun 2013 09:06:20 +0000 (11:06 +0200)
committerAlexander Larsson <alexl@redhat.com>
Wed, 19 Jun 2013 09:15:37 +0000 (11:15 +0200)
commit159cccfe7b50e1e0fbede08132abfc74f4206fdb
treefe79eaaf147fd58817def448542b8933d2d9b990
parent74e7a9e20ae0ba34c47c9b178ffee55f53de7c2a
IconTheme: Move changed emission to an idle

By delaying the emission to an idle we avoid a lot of tricky
reentrancy issues. For instance, a normal gtk_icon_theme_choose_icon()
call could in very rare cases (when a user updated an icon theme) emit
a signal which could affect the icon currently being looked up.  This
kind of reentrancy is very hard to test against, especially when it is
so rare, so we're better of avoiding it.

There is no real value to get the change signal directly anyway. All
it can do is affect which icon is rendered the next frame, and we will
handle the queued emission before rendering. Not to mention that icon
theme change detection is polled anyway, so it is already delayed.

https://bugzilla.gnome.org/show_bug.cgi?id=694755
gtk/gtkicontheme.c